package Class.base;

public class Main05 {
    public static void main(String[] args) {
        String font = "嘻嘻";
        String font2 = "嘻嘻";
        System.out.println(font instanceof String);
        if (font.equals(font2)) {
            System.out.println("這是相等的哈哈");
        }
        if (font == "嘻嘻" && font2 == "嘻嘻") {
            System.out.println("与是成立的");
        }
        if (font == "嘻嘻" || font2 == "嘻嘻111") {
            System.out.println("或是成立的");
        }
        // java的三元运算符和js中的不太一样，用js的写法写好像会报错
        int bn;
        bn = font.equals("嘻嘻") ? 1000 : 200000;
        System.out.println(bn);

        int day = 2;
        int num = 10;
        int num3 = 0;
        if ((day + num) <= 7) {
            num3 = (day + num);
        } else {
            num3 = (day + num) % 7;
        }
        System.out.println("星期" + num3);
    }
}